﻿using Conqueror.WP.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace Conqueror.WP.ViewModel.Games
{
    public class GamePlayerViewModel : ViewModel
    {
        private string name;
        private Brush brush;

        public string PlayerName
        {
            get { return name; }
            set
            {
                if (name != value)
                {
                    name = value;
                    Notify("PlayerName");
                }
            }
        }

        public Brush PlayerBrush
        {
            get { return brush; }
            set
            {
                if (brush != value)
                {
                    brush = value;
                    Notify("PlayerBrush");
                }
            }
        }

        public GamePlayerViewModel(Conqueror.API.GamePlayer player)
        {
            this.name = player.Name;
            brush = PlayerColors.GetBrush(player.State);
        }
    }
}
